<extend name="Index::index"/>
    <block name="table">
        <div class="layout-content">

            <div class="page-title">广告管理</div>

            <div class="content-top">
                <ul class="top-nav">
                    <li class="active"><span>广告列表</span></li>
                </ul>
                <div class="clearfix"></div>
            </div>

            <!--content-main start-->
            <div class="container-fluid content-main">
                <div class="row">
                    <div class="col-md-12">

                        <div class="hidden ui-tips bg-info">
                            <span class="icon glyphicon glyphicon-info-sign"></span>
                            <span>提示信息提示信息提示信息提示信息提示信息提示信息。</span>
                        </div>

                        <form action="{:U(index)}" method="get" class=" form-inline form-search mt15">
                            <div class="form-group">
                                <label>关键字搜索</label>
                                <input type="text" placeholder="输入广告的名字" class="form-control input-sm" name="name"  value="{$name}"/>
                            </div>
                            <button type="submit" class="btn btn-success btn-sm">
                                <span class="glyphicon glyphicon-search"></span> 搜索
                            </button>
                        </form>

                        <div class="mt15 pr15">
                            <!--直接跳转到当前文件下的creat.html文件-->
                            <a href="{:U('Addver/create')}" class="btn btn-sm btn-success pull-right"><span
                                    class="glyphicon glyphicon-plus"></span> 添加广告</a>
                            <div class="clearfix"></div>
                        </div>

                        <table class="table table-hover mt15">
                            <thead>
                            <tr>
                                <th>广告名</th>
                                <th>广告链接</th>
                                <th>广告图片</th>
                                <th>状态</th>
                                <th width="120">操作</th>
                            </tr>
                            </thead>
                            <notempty name="data">
                            <foreach name="data" item="val">
                                <thead>
                                <tr>
                                    <th>{$val['name']}</th>
                                    <th>{$val['url']}</th>
                                    <th><img src="__PUBLIC__/upload/{$val['picture']}" width="130" height="60" alt=""></th>
                                    <th><a href="{:U('Addver/updated',['id'=>$val['id'],'key'=>11])}">{$val['status']}</a></th>
                                    <!--直接跳转到当前文件下的update.html文件-->
                                    <th width="120" align="center">  <a href="{:U('Addver/updated',['id'=>$val['id']])}">修改</a>|<a href="{:U('Addver/deleted',['id'=>$val['id']])}">删除</a></th>
                                </tr>
                                </thead>
                            </foreach>
                                <else />
                                <thead>
                                <tr>
                                    <th colspan="5">没有广告请添加</th>
                                </tr>
                                </thead>
                            </notempty>
                        </table>

                        <div class="pull-right">
                            {$page}
                        </div>
                        <div class="clearfix"></div>

                    </div>
                </div>

            </div>
            <!--content-main end-->

        </div>
        <!--右内容区域结束-->

        <div class="clearfix"></div>

    </block>
